package com.demo.component;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;

/**
 * @author krystal
 * @date 2023/3/7 8:49
 */
@Component
public class AComponent {
    @Autowired
    private BComponent component;

    @PostConstruct
    public void postConstruct(){
        System.out.println("执行了A对象的postConstruct方法");
    }
}
